package com.stars.module.unit.service;

import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject;
import com.stars.base.entity.CommonDTO;
import com.stars.base.exception.BaseException;
import com.stars.module.unit.entity.StarUnitEntity;

/**
 * @author : mango
 * @version : 1.0
 * @date : 2022/10/31 11:19
 * @description : 部门服务接口
 */
public interface StarUnitService {
    JSONObject loadUnitByFid(CommonDTO dto);

    JSONArray loadAllUnit();

    StarUnitEntity loadUnitById(String unitId);

    boolean saveOrUpdateUnit(StarUnitEntity unit) throws BaseException;

    boolean removeDept(String id);

    Integer getMaxIndex(String fid);

    JSONObject getUnitRoot();
}
